package com.hx.test.repository;

import com.hx.test.domain.User;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

import java.util.Optional;

public interface UserRepository extends JpaRepository<User, String>, QuerydslPredicateExecutor<User>, UserCustom {

    @EntityGraph(value = "User.Graph", type = EntityGraph.EntityGraphType.FETCH)
    Optional<User> findById(String id);
}
